const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  publicPath: './',
  outputDir: 'dist',
  lintOnSave: true,
  productionSourceMap: false,
  css: {
    extract: true,
    sourceMap: false,
    loaderOptions: {
    },
    modules: false
  },


  devServer: {
    host: '0.0.0.0',
    port: '7902',
    open: true,
    overlay: {
      warnings: true,
      errors: true
    }
  },
  'configureWebpack': {
    // 覆盖webpack默认配置的都在这里
    'resolve': {
      // 配置解析别名
      'alias': {
        '@': path.resolve(__dirname, './src'),
        '@views': path.resolve(__dirname, './src/views'),
        '@components': path.resolve(__dirname, './src/components')
      }
    }
  }
}

